projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48ca9b7
)
Test for EOF on read in an1 reader.
author
robertl
<robertl>
Tue, 20 Jun 2006 01:49:43 +0000
(
01:49
+0000)
committer
robertl
<robertl>
Tue, 20 Jun 2006 01:49:43 +0000
(
01:49
+0000)
an1.c
patch
|
blob
|
history
diff --git
a/an1.c
b/an1.c
index 134335ee2021a35002e80b864896c6d1b1adc09e..e47af08d72307978c751dc9938a3afca1cf31b2c 100644
(file)
--- a/
an1.c
+++ b/
an1.c
@@
-154,7
+154,9
@@
static unsigned char
ReadChar( FILE *f )
{
unsigned char result = 0;
- fread( &result, 1, 1, f );
+ if (fread( &result, 1, 1, f ) < 1) {
+ fatal( MYNAME ": error reading an1 file. Perhaps this isn't really an an1 file.");
+ }
return result;
}